//
//  GHANetWorkingManager.h
//  PensionDoctor
//
//  Created by tbb on 2019/7/2.
//  Copyright © 2019 YQ. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
@class YQPNetWorkingBaseModel;
typedef void(^queryResultHandle)(BOOL successed, id serverData, NSString* errorCode, NSString* errorMessage);
@interface YQPNetWorkingManager : NSObject
#pragma mark - 网络请求-Get方式
+ (void)sendGetRequest:(NSString *)url
            parameters:(NSDictionary * _Nullable)parameters
               success:(void (^)(YQPNetWorkingBaseModel *responseObject))success
               failure:(void (^)(NSUInteger statusCode,NSString *error))failure;
+ (void)sendGetRequest:(NSString *)url
            parameters:(NSDictionary * _Nullable)parameters
               success:(void (^)(YQPNetWorkingBaseModel *responseObject))success
               failure:(void (^)(NSUInteger statusCode,NSString *error))failure
             parseData:(BOOL)parseData;
+ (void)sendGetRequestToWeChat:(NSString*)url
parameters:(id)parameters
   success:(void (^)(id responseObject))success
                       failure:(void (^)(NSError* error))failure;
#pragma mark - 网络请求-Post方式
+ (void)sendPostRequest:(NSString *)url
             parameters:(id _Nullable)parameters
                success:(void (^)(YQPNetWorkingBaseModel *responseObject))success
                failure:(void (^)(NSUInteger statusCode,NSString *error))failure;

+ (void)sendPostRequest:(NSString *)url
             parameters:(id _Nullable)parameters
                success:(void (^)(YQPNetWorkingBaseModel *responseObject))success
                failure:(void (^)(NSUInteger statusCode,NSString *error))failure
              parseData:(BOOL)parseData;

/// 表单提交字段1
+ (void)POSTWithForm:(NSString *_Nullable)URLString parameters:(id _Nullable)parameters
    success:(void (^)(YQPNetWorkingBaseModel *responseObject))success
             failure:(void (^)(NSUInteger statusCode,NSString *error))failure;

/// 表单提交字段2
+ (void)POSTWithForm:(NSString *_Nullable)URLString parameters:(id _Nullable)parameters
    success:(void (^)(YQPNetWorkingBaseModel *responseObject))success
             failure:(void (^)(NSUInteger statusCode,NSString *error))failure
           parseData:(BOOL)parseData;

+ (id)sendPOSTWithForm:(NSString *)URLString parameters:(NSDictionary *)parameters success:(void (^)(YQPNetWorkingBaseModel *responseObject))success failure:(void (^)(NSUInteger statusCode,NSString *error))failure;

#pragma mark - 网络请求-Post+file方式
+ (void)sendPostRequest:(NSString *)url
             parameters:(NSDictionary *)parameters
               fileData:(NSData *)fileData
               fileName:(NSString *)fileName
                success:(void (^)(id responseObject))success
                failure:(void (^)(NSUInteger statusCode,NSString *error))failure;
#pragma mark - 网络请求-Post+file方式 多图片
+ (void)sendPostRequest:(NSString *)url
             parameters:(NSDictionary *)parameters
               fileDataArr:(NSArray <NSData *> *)fileData
               fileName:(NSString *)fileName
                success:(void (^)(id responseObject))success
                failure:(void (^)(NSUInteger statusCode,NSString *error))failure;

#pragma mark - 网络请求-Post+file方式 多图片
+ (void)sendPostRequests:(NSString *)url
             parameters:(NSDictionary  * _Nullable)parameters
               fileDataArr:(NSArray <NSData *> *)fileDataArr
               fileName:(NSString *)fileName
                success:(void (^)(YQPNetWorkingBaseModel *responseObject))success
                failure:(void (^)(NSUInteger statusCode,NSString *error))failure ;
@end

NS_ASSUME_NONNULL_END
